From Core Rulebook, p. 279:
Range: Ranged and thrown weapons have a range increment. Attacks with these weapons work normally up to that distance. Attack rolls beyond a weapon’s range increment take a –2 penalty for each additional multiple of that increment between you and the target. Attacks beyond the sixth range increment are impossible.
For example, a shortbow takes no penalty against a target up to 60 feet away, a –2 penalty against a target beyond 60 feet but up to 120 feet away, and a –4 penalty against a target beyond 120 feet but up to 180 feet away, and so on, up to 360 feet.
What I am trying to figure out is if this also applies to spells which have the Attack trait and thus perform a ranged attack when cast against a target.
On one hand, Core Rulebook states on p. 304:
Targets: Some spells allow you to directly target a creature, an object, or something that fits a more specific category. The target must be within the spell’s range, and you must be able to see it (or otherwise perceive it with a precise sense) to target it normally.
On the other hand, it also states for Spell Attacks on p. 305:
Spell Attacks: Some spells require you to succeed at a spell attack roll to affect the target. This is usually because they require you to precisely aim a ray or otherwise make an accurate attack. A spell attack roll is compared to the target’s AC. Spell attack rolls benefit from any bonuses or penalties to attack rolls, including your multiple attack penalty, but not any special benefits or penalties that apply only to weapon or unarmed attacks.
So, if I cast for example Divine Lance (p. 331) which has the Attack Trait, a range of 30 feet and targets 1 creature, is the spell able to hit a target further than 30 feet from me but with the appropriate range increment penalty taken into account? Or is it completely ineffective for any target out of nominal range (30 feet for the aforementioned spell)?